package com.pap.rbacfeignapi;

import com.pap.obj.vo.response.ResponseVO;
import com.pap.rbacfeignapi.dto.UserInfoDTO;
import com.pap.rbacfeignapi.dto.UserLoginDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "${pap-rbac}", path = "${pap-rbac-path}", fallbackFactory=UserServiceFeignFactory.class)
public interface IUserService {

    @RequestMapping(value = "/user/loginbyloginname", method = {RequestMethod.POST} )
    public ResponseVO<UserInfoDTO> loginByLoginName(@RequestHeader(value = "papVersion", defaultValue = "1.0") String papVersion,
                                                    @RequestBody UserLoginDTO userLoginDTO);

}
